<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>练习换肤功能</title>
        <script language="JavaScript">
            function change_red(){
                var box = document.getElementById("RedGreen");
                box.style.backgroundColor = "red";
            }
            function change_green(){
                var box = document.getElementById("RedGreen");
                box.style.backgroundColor = "green";
            }
        </script>
    </head>
    <body>
        <div style="background-color: green;height:50px;width:50px" id="RedGreen" onmouseover=change_red() onmouseout="change_green()"></div>
        <!-- <p>sdjfk</p> -->
    </body>
</html>